/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
var Util = {
    /**
     * Janela modal padrao
     * @param json paramJson = titulo,conteudo,altura,largura,acaoBotoes, acaoFechar
     */ 
    modal:function(id,paramJson){
        var vmodal = "vmodal"+id;
        if($("#"+vmodal)){
            $("#"+vmodal).remove();
        }     
        var voitech_modal = "<div id="+vmodal+" title='"+paramJson.titulo+"'></div>";
        $('body').append(voitech_modal);
        $("#"+vmodal).html(paramJson.conteudo)
                     .dialog({
                        height: paramJson.altura,
                        width: paramJson.largura,
                        position: ['10%',0],
                        closeOnEscape:false,
                        modal: true,
                        buttons: paramJson.acaoBotoes
                        });        
    },
    addEventClear: function(titulo)
    {
            $( "#btImprimirTela" ).click( function() {
                    $('#content_sys').printArea({popTitle:titulo});
                    //window.print();
                    return false;
            });
            $( "#btnFecharTela" ).click( function() {
                    window.close();
                    return false;
            });
    },
    
    popUp:function(url,nome){
        window.open(url,nome,'width=800, height=500, scrollbars=yes,resizable=yes, location=no, status=no');
    }
    
    
    
    
    
};